/* 
 * File:   Drop.h
 * Author: Gab'z
 *
 * Created on 31 mai 2012, 14:47
 */

#ifndef DROP_H
#define	DROP_H

#include "NullaryOperator.h"

namespace calculator {

    class Drop : public NullaryOperator {
        friend class CommandMap;

    public:
        virtual ~Drop();
        std::string isExecutable() const;

        Drop* clone() const;

        const Memento* createMemento() const throw (CommandException);
        void restoreFromMemento(const Memento* memento) const throw (MementoException);
        
    private:
        Drop(const std::string name);
        Drop(const Drop& orig);

        void eval(Stack* stack) const throw (CommandException);
    };
}

#endif	/* DROP_H */

